﻿@using Entidades.Sistema.Venta
@using Entidades.Sistema.Base
@using System.Collections.ObjectModel;

@model Cliente

@Html.DevExpress().PageControl(settings =>
{
    settings.Name = "PageControl";
    settings.TabPages.Add(tabpage =>
    {
        tabpage.Name = "TabPage1";
        tabpage.Text = "Datos Generales";
        tabpage.SetContent(() =>
        {
            ViewContext.Writer.Write(String.Format("<div id='{0}' >", tabpage.Name));
            Html.RenderPartial("EditingForm", Model);
            ViewContext.Writer.Write("</div>");
        });
    });
    settings.TabPages.Add(tabpage =>
    {
        tabpage.Name = "TabPage2";
        tabpage.Text = "Contactos";
        
        tabpage.SetContent(() =>
        {
            ViewContext.Writer.Write(String.Format("<div id='{0}' >", tabpage.Name));
            Html.RenderAction("EditContactoPartial", "Contacto", new { nrocliente = Model.IdCliente });
            ViewContext.Writer.Write("</div>");
        });
    });
    settings.TabPages.Add(tabpage =>
    {
        tabpage.Name = "TabPage3";
        tabpage.Text = "Pedidos";
        tabpage.SetContent(() =>
        {
            ViewContext.Writer.Write(String.Format("<div id='{0}'>", tabpage.Name));
            Html.RenderAction("EditPedidosPartial", "Pedidos", new { idcliente = Model.IdCliente });
            ViewContext.Writer.Write("</div>");
        });
    });
}).GetHtml()